<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
  xmlns:ui="http://java.sun.com/jsf/facelets"
  xmlns:h="http://java.sun.com/jsf/html"
  xmlns:f="http://java.sun.com/jsf/core"
  xmlns:c="http://java.sun.com/jstl/core"
  template="/WEB-INF/layouts/templateAdmin.xhtml">

  <ui:define name="menu">
    <!-- INCLUDE MENU -->
  </ui:define>

  <ui:define name="content">
    <!-- INCLUDE CONTENT -->
    <h1 class="pageTitle">Create a new account</h1>

    <h:form id="addAccount">
      <h:panelGrid columns="2">
        <h:outputText class="inlineText" value="Firstname* : " />
        <h:panelGroup>
          <h:inputText value="#{flowScope.personAdd.firstName}"
            id="firstname" required="true" />
          <h:message for="firstname" />
        </h:panelGroup>

        <h:outputText value="Lastname* :" />
        <h:panelGroup>
          <h:inputText value="#{flowScope.personAdd.lastName}"
            id="lastname" required="true" />
          <h:message for="lastname" />
        </h:panelGroup>

        <h:outputText value="Group :" />
        <h:panelGroup>
          <h:selectOneMenu value="#{flowScope.personAdd.group}"
            id="group">
            <f:selectItem itemValue="admin" itemLabel="admin" />
            <f:selectItem itemValue="user" itemLabel="user" />
            <f:selectItem itemValue="buyer" itemLabel="buyer" />
          </h:selectOneMenu>
          <h:message for="group" />
        </h:panelGroup>

        <h:outputText value="Email :" />
        <h:panelGroup>
          <h:inputText value="#{flowScope.personAdd.user_id}"
            id="userid" required="false">
          </h:inputText>
          <h:message for="userid" />
        </h:panelGroup>

        <h:outputText class="inlineText" value="Phone Number :" />
        <h:panelGroup>
          <h:inputText value="#{flowScope.personAdd.telephoneNumber}"
            id="telephoneNumber" required="false" />
          <h:message for="telephoneNumber" />
        </h:panelGroup>

        <h:outputText class="inlineText" value="Password :" />
        <h:panelGroup>
          <h:inputSecret value="#{flowScope.personAdd.userPassword}"
            id="password" required="false" />
          <h:message for="password" />
        </h:panelGroup>

        <h:outputText value="Cell Number :" />
        <h:panelGroup>
          <h:inputText value="#{flowScope.personAdd.mobile}"
            id="cellNumber" required="false" />
          <h:message for="cellNumber" />
        </h:panelGroup>

        <h:outputText value="Address :" />
        <h:panelGroup>
          <h:inputText value="#{flowScope.personAdd.postalAddress}"
            id="address" required="false" />
          <h:message for="address" />
        </h:panelGroup>

        <h:outputText value="Postal Code :" />
        <h:panelGroup>
          <h:inputText value="#{flowScope.personAdd.postalCode}"
            id="postalCode" required="false" />
          <h:message for="postalCode" />
        </h:panelGroup>

        <h:outputText value="City :" />
        <h:panelGroup>
          <h:inputText value="#{flowScope.personAdd.city}" id="city"
            required="false" />
          <h:message for="city" />
        </h:panelGroup>

        <h:outputText value="Description* :" />
        <h:panelGroup>
          <h:inputTextarea value="#{flowScope.personAdd.description}"
            id="description" required="true" rows="4" cols="60" />
          <h:message for="description" />
        </h:panelGroup>

      </h:panelGrid>

      <br />

      <h:commandButton value="Create Account" action="add" type="submit" />

    </h:form>
    <h:form>
      <h:commandLink action="back">
        Back
      </h:commandLink>
    </h:form>
  </ui:define>
</ui:composition>
